<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce_dev.js?debug=1"></script>
<script type="text/javascript" src="js/testrunner.js"></script>
<link rel="stylesheet" href="css/unit.css" type="text/css" />
<script>
var editor;

test("Flash object elements - strict output", function() {
	expect(13);

	editor.settings.media_strict = 1;
	editor.settings.relative_urls = 1;

	editor.setContent('<object width="425" height="355"><param name="movie" value="someurl"></param><param name="wmode" value="transparent"></param><embed src="someurl" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355" /></object>');
	equals(editor.getContent(), '<p><object width="425" height="355" data="someurl" type="application/x-shockwave-flash"><param name="wmode" value="transparent" /><param name="src" value="someurl" /></object></p>');

	editor.setContent('<object width="425" height="355"><param name="movie" value="someurl"></param><param name="wmode" value="transparent"></param><embed src="someurl" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>');
	equals(editor.getContent(), '<p><object width="425" height="355" data="someurl" type="application/x-shockwave-flash"><param name="wmode" value="transparent" /><param name="src" value="someurl" /></object></p>');

	editor.setContent('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="transparent" /><param name="src" value="someurl" /><embed type="application/x-shockwave-flash" width="425" height="355" src="someurl" wmode="transparent"></embed></object>');
	equals(editor.getContent(), '<p><object width="425" height="355" data="someurl" type="application/x-shockwave-flash"><param name="wmode" value="transparent" /><param name="src" value="someurl" /></object></p>');

	editor.settings.relative_urls = 0;

	editor.setContent('<object width="425" height="355"><param name="movie" value="someurl"></param><param name="wmode" value="transparent"></param><embed src="someurl" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>');
	equals(editor.getContent(), '<p><object width="425" height="355" data="/tinymce/tinymce/trunk/tests/someurl" type="application/x-shockwave-flash"><param name="wmode" value="transparent" /><param name="src" value="/tinymce/tinymce/trunk/tests/someurl" /></object></p>');

	editor.setContent('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="transparent" /><param name="src" value="someurl" /><embed type="application/x-shockwave-flash" width="425" height="355" src="someurl" wmode="transparent"></embed></object>');
	equals(editor.getContent(), '<p><object width="425" height="355" data="/tinymce/tinymce/trunk/tests/someurl" type="application/x-shockwave-flash"><param name="wmode" value="transparent" /><param name="src" value="/tinymce/tinymce/trunk/tests/someurl" /></object></p>');

	editor.setContent('<embed type="application/x-shockwave-flash" width="425" height="355" src="someurl" flashvars="m=7286090&v=2&type=video"></embed>');
	equals(editor.getContent(), '<p><object width="425" height="355" data="/tinymce/tinymce/trunk/tests/someurl" type="application/x-shockwave-flash"><param name="flashvars" value="m=7286090&amp;v=2&amp;type=video" /><param name="src" value="/tinymce/tinymce/trunk/tests/someurl" /></object></p>');

	editor.setContent('<embed type="application/x-shockwave-flash" width="425" height="355" src="someurl" flashvars="m=7286090&v=2&type=video"></embed><p>text</p>');
	equals(editor.getContent(), '<p><object width="425" height="355" data="/tinymce/tinymce/trunk/tests/someurl" type="application/x-shockwave-flash"><param name="flashvars" value="m=7286090&amp;v=2&amp;type=video" /><param name="src" value="/tinymce/tinymce/trunk/tests/someurl" /></object></p><p>text</p>');

	editor.setContent('<embed type="application/x-shockwave-flash" width="425" height="355" src="someurl" flashvars="m=7286090&v=2&type=video"><p>text</p>');
	equals(editor.getContent(), '<p><object width="425" height="355" data="/tinymce/tinymce/trunk/tests/someurl" type="application/x-shockwave-flash"><param name="flashvars" value="m=7286090&amp;v=2&amp;type=video" /><param name="src" value="/tinymce/tinymce/trunk/tests/someurl" /></object></p><p>text</p>');

	editor.setContent('<embed type="application/x-shockwave-flash" width="425" height="355" src="someurl" flashvars="m=7286090&v=2&type=video" /><p>text</p>');
	equals(editor.getContent(), '<p><object width="425" height="355" data="/tinymce/tinymce/trunk/tests/someurl" type="application/x-shockwave-flash"><param name="flashvars" value="m=7286090&amp;v=2&amp;type=video" /><param name="src" value="/tinymce/tinymce/trunk/tests/someurl" /></object></p><p>text</p>');

	editor.setContent('<embed type="application/x-shockwave-flash" width="425" height="355" src="someurl" flashvars="m=7286090&v=2&type=video" /><p>text</p>');
	equals(editor.getContent(), '<p><object width="425" height="355" data="/tinymce/tinymce/trunk/tests/someurl" type="application/x-shockwave-flash"><param name="flashvars" value="m=7286090&amp;v=2&amp;type=video" /><param name="src" value="/tinymce/tinymce/trunk/tests/someurl" /></object></p><p>text</p>');

	editor.setContent('<object width="320" height="240"><embed src="/tinymce/tinymce/trunk/tests/someurl" type="application/x-shockwave-flash" width="320" height="240"></embed></object>');
	equals(editor.getContent(), '<p><object width="320" height="240" data="/tinymce/tinymce/trunk/tests/someurl" type="application/x-shockwave-flash"><param name="src" value="/tinymce/tinymce/trunk/tests/someurl" /></object></p>');

	editor.setContent('<object width="320" height="240" style="width: 320px; height: 240px;"><embed src="/tinymce/tinymce/trunk/tests/someurl" type="application/x-shockwave-flash" width="320" height="240"></embed></object>');
	equals(editor.getContent(), '<p><object style="width: 320px; height: 240px;" width="320" height="240" data="/tinymce/tinymce/trunk/tests/someurl" type="application/x-shockwave-flash"><param name="src" value="/tinymce/tinymce/trunk/tests/someurl" /></object></p>');

	editor.setContent('<object data="/tinymce/tinymce/trunk/tests/someurl" width="320" height="240" type="application/x-shockwave-flash"></object>');
	equals(editor.getContent(), '<p><object width="320" height="240" data="/tinymce/tinymce/trunk/tests/someurl" type="application/x-shockwave-flash"><param name="src" value="/tinymce/tinymce/trunk/tests/someurl" /></object></p>');
});

test("Flash object elements - compatible output", function() {
	expect(12);

	editor.settings.media_strict = 0;
	editor.settings.relative_urls = 1;

	editor.setContent('<object width="425" height="355"><param name="movie" value="someurl"></param><param name="wmode" value="transparent"></param><embed src="someurl" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355" /></object>');
	equals(editor.getContent(), '<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="transparent" /><param name="src" value="someurl" /><embed type="application/x-shockwave-flash" width="425" height="355" src="someurl" wmode="transparent"></embed></object></p>');

	editor.setContent('<object width="425" height="355"><param name="movie" value="someurl"></param><param name="wmode" value="transparent"></param><embed src="someurl" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>');
	equals(editor.getContent(), '<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="transparent" /><param name="src" value="someurl" /><embed type="application/x-shockwave-flash" width="425" height="355" src="someurl" wmode="transparent"></embed></object></p>');

	editor.setContent('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="transparent" /><param name="src" value="someurl" /><embed type="application/x-shockwave-flash" width="425" height="355" src="someurl" wmode="transparent"></embed></object>');
	equals(editor.getContent(), '<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="transparent" /><param name="src" value="someurl" /><embed type="application/x-shockwave-flash" width="425" height="355" src="someurl" wmode="transparent"></embed></object></p>');

	editor.settings.relative_urls = 0;

	editor.setContent('<object width="425" height="355"><param name="movie" value="someurl"></param><param name="wmode" value="transparent"></param><embed src="someurl" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>');
	equals(editor.getContent(), '<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="transparent" /><param name="src" value="/tinymce/tinymce/trunk/tests/someurl" /><embed type="application/x-shockwave-flash" width="425" height="355" src="/tinymce/tinymce/trunk/tests/someurl" wmode="transparent"></embed></object></p>');

	editor.setContent('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="transparent" /><param name="src" value="someurl" /><embed type="application/x-shockwave-flash" width="425" height="355" src="someurl" wmode="transparent"></embed></object>');
	equals(editor.getContent(), '<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="transparent" /><param name="src" value="/tinymce/tinymce/trunk/tests/someurl" /><embed type="application/x-shockwave-flash" width="425" height="355" src="/tinymce/tinymce/trunk/tests/someurl" wmode="transparent"></embed></object></p>');

	editor.setContent('<embed type="application/x-shockwave-flash" width="425" height="355" src="someurl" flashvars="m=7286090&v=2&type=video"></embed>');
	equals(editor.getContent(), '<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="flashvars" value="m=7286090&amp;v=2&amp;type=video" /><param name="src" value="/tinymce/tinymce/trunk/tests/someurl" /><embed type="application/x-shockwave-flash" width="425" height="355" src="/tinymce/tinymce/trunk/tests/someurl" flashvars="m=7286090&amp;v=2&amp;type=video"></embed></object></p>');

	editor.setContent('<embed type="application/x-shockwave-flash" width="425" height="355" src="someurl" flashvars="m=7286090&v=2&type=video"></embed>text');
	equals(editor.getContent(), '<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="flashvars" value="m=7286090&amp;v=2&amp;type=video" /><param name="src" value="/tinymce/tinymce/trunk/tests/someurl" /><embed type="application/x-shockwave-flash" width="425" height="355" src="/tinymce/tinymce/trunk/tests/someurl" flashvars="m=7286090&amp;v=2&amp;type=video"></embed></object>text</p>');

	editor.setContent('<embed type="application/x-shockwave-flash" width="425" height="355" src="someurl" flashvars="m=7286090&v=2&type=video">text');
	equals(editor.getContent(), '<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="flashvars" value="m=7286090&amp;v=2&amp;type=video" /><param name="src" value="/tinymce/tinymce/trunk/tests/someurl" /><embed type="application/x-shockwave-flash" width="425" height="355" src="/tinymce/tinymce/trunk/tests/someurl" flashvars="m=7286090&amp;v=2&amp;type=video"></embed></object>text</p>');

	editor.setContent('<embed type="application/x-shockwave-flash" width="425" height="355" src="someurl" flashvars="m=7286090&v=2&type=video" />text');
	equals(editor.getContent(), '<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="flashvars" value="m=7286090&amp;v=2&amp;type=video" /><param name="src" value="/tinymce/tinymce/trunk/tests/someurl" /><embed type="application/x-shockwave-flash" width="425" height="355" src="/tinymce/tinymce/trunk/tests/someurl" flashvars="m=7286090&amp;v=2&amp;type=video"></embed></object>text</p>');

	editor.setContent('<embed type="application/x-shockwave-flash" width="425" height="355" src="someurl" flashvars="m=7286090&v=2&type=video" />text');
	equals(editor.getContent(), '<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="flashvars" value="m=7286090&amp;v=2&amp;type=video" /><param name="src" value="/tinymce/tinymce/trunk/tests/someurl" /><embed type="application/x-shockwave-flash" width="425" height="355" src="/tinymce/tinymce/trunk/tests/someurl" flashvars="m=7286090&amp;v=2&amp;type=video"></embed></object>text</p>');

	editor.setContent('<object width="320" height="240"><embed src="/tinymce/tinymce/trunk/tests/someurl" type="application/x-shockwave-flash" width="320" height="240"></embed></object>');
	equals(editor.getContent(), '<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="320" height="240" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="/tinymce/tinymce/trunk/tests/someurl" /><embed type="application/x-shockwave-flash" width="320" height="240" src="/tinymce/tinymce/trunk/tests/someurl"></embed></object></p>');

	editor.setContent('<object width="320" height="240" style="width: 320px; height: 240px;"><embed src="/tinymce/tinymce/trunk/tests/someurl" type="application/x-shockwave-flash" width="320" height="240"></embed></object>');
	equals(editor.getContent(), '<p><object style="width: 320px; height: 240px;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="320" height="240" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="/tinymce/tinymce/trunk/tests/someurl" /><embed style="width: 320px; height: 240px;" type="application/x-shockwave-flash" width="320" height="240" src="/tinymce/tinymce/trunk/tests/someurl"></embed></object></p>');
});

test("Quicktime object elements - compatible output", function() {
	expect(1);

	editor.settings.media_strict = 0;
	editor.settings.relative_urls = 1;

	editor.setContent('<object classid="clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b" width="320" height="240" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"><param name="src" value="test" /><embed type="video/quicktime" width="320" height="240" src="test"></embed></object>');
	equals(editor.getContent(), '<p><object classid="clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b" width="320" height="240" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"><param name="src" value="test" /><embed type="video/quicktime" width="320" height="240" src="test"></embed></object></p>');
});

test("Windows media object elements - compatible output", function() {
	expect(1);

	editor.setContent('<object classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" width="320" height="240" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" id="test"><param name="src" value="test" /><embed id=\"test\" type="application/x-mplayer2" width="320" height="240" src="test"></embed></object>');
	equals(editor.getContent(), '<p><object id=\"test\" classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" width="320" height="240" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"><param name="url" value="test" /><embed id=\"test\" type="application/x-mplayer2" width="320" height="240" src="test"></embed></object></p>');
});

test("Real media object elements - compatible output", function() {
	expect(1);

	editor.setContent('<object classid="clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa" width="320" height="240" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="test" /><embed type="audio/x-pn-realaudio-plugin" width="320" height="240" src="test"></embed></object>');
	equals(editor.getContent(), '<p><object classid="clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa" width="320" height="240" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="test" /><embed type="audio/x-pn-realaudio-plugin" width="320" height="240" src="test"></embed></object></p>');
});

test("Shockwave object elements - compatible output", function() {
	expect(1);

	editor.setContent('<object classid="clsid:166b1bca-3f9c-11cf-8075-444553540000" width="320" height="240" codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"><param name="src" value="test" /><embed type="application/x-director" width="320" height="240" src="test"></embed></object>');
	equals(editor.getContent(), '<p><object classid="clsid:166b1bca-3f9c-11cf-8075-444553540000" width="320" height="240" codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"><param name="src" value="test" /><embed type="application/x-director" width="320" height="240" src="test"></embed></object></p>');
});

test("Flash script embed", function() {
	expect(2);

	editor.settings.media_use_script = true;

	editor.setContent('<object width="425" height="355"><param name="movie" value="someurl"></param><param name="wmode" value="transparent"></param><embed src="someurl" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>');
	equals(editor.getContent(), '<p><script type="text/javascript">writeFlash({"wmode":"transparent","src":"someurl","width":"425","height":"355"});</' + 'script></p>');

	editor.setContent('<p><script type="text/javascript">writeFlash({"wmode":"transparent","src":"someurl","width":"425","height":"355"});</' + 'script></p>');
	equals(editor.getContent(), '<p><script type="text/javascript">writeFlash({"wmode":"transparent","src":"someurl","width":"425","height":"355"});</' + 'script></p>');
});

test("Quicktime script embed", function() {
	expect(2);

	editor.settings.media_use_script = true;

	editor.setContent('<object classid="clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b" width="320" height="240" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"><param name="src" value="test" /><embed type="video/quicktime" width="320" height="240" src="test"></embed></object>');
	equals(editor.getContent(), '<p><script type="text/javascript">writeQuickTime({"src":"test","width":"320","height":"240"});</' + 'script></p>');

	editor.setContent('<p><script type="text/javascript">writeQuickTime({"src":"test","width":"320","height":"240"});</'+'script></p>');
	equals(editor.getContent(), '<p><script type="text/javascript">writeQuickTime({"src":"test","width":"320","height":"240"});</'+'script></p>');
});

test("Windows media script embed", function() {
	expect(2);

	editor.settings.media_use_script = true;

	editor.setContent('<object classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" width="320" height="240" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"><param name="src" value="test" /><embed type="application/x-mplayer2" width="320" height="240" src="test"></embed></object>');
	equals(editor.getContent(), '<p><script type="text/javascript">writeWindowsMedia({"src":"test","width":"320","height":"240"});</' + 'script></p>');

	editor.setContent('<p><script type="text/javascript">writeWindowsMedia({"src":"test","width":"320","height":"240"});</'+'script></p>');
	equals(editor.getContent(), '<p><script type="text/javascript">writeWindowsMedia({"src":"test","width":"320","height":"240"});</'+'script></p>');
});

test("Real media script embed", function() {
	expect(2);

	editor.settings.media_use_script = true;

	editor.setContent('<object classid="clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa" width="320" height="240" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="test" /><embed type="audio/x-pn-realaudio-plugin" width="320" height="240" src="test"></embed></object>');
	equals(editor.getContent(), '<p><script type="text/javascript">writeRealMedia({"src":"test","width":"320","height":"240"});</' + 'script></p>');

	editor.setContent('<p><script type="text/javascript">writeRealMedia({"src":"test","width":"320","height":"240"});</'+'script></p>');
	equals(editor.getContent(), '<p><script type="text/javascript">writeRealMedia({"src":"test","width":"320","height":"240"});</'+'script></p>');
});

test("Shockwave media script embed", function() {
	expect(2);

	editor.settings.media_use_script = true;

	editor.setContent('<object classid="clsid:166b1bca-3f9c-11cf-8075-444553540000" width="320" height="240" codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"><param name="src" value="test" /><embed type="application/x-director" width="320" height="240" src="test"></embed></object>');
	equals(editor.getContent(), '<p><script type="text/javascript">writeShockWave({"src":"test","width":"320","height":"240"});</' + 'script></p>');

	editor.setContent('<p><script type="text/javascript">writeShockWave({"src":"test","width":"320","height":"240"});</'+'script></p>');
	equals(editor.getContent(), '<p><script type="text/javascript">writeShockWave({"src":"test","width":"320","height":"240"});</'+'script></p>');
});

tinyMCE.init({
	mode : "exact",
	elements : "elm1",
	theme : "advanced",
	add_unload_trigger : false,
	apply_source_formatting : false,
	document_base_url : '/tinymce/tinymce/trunk/tests/',
	plugins : 'safari,media',
	init_instance_callback : function(ed) {
		editor = ed;
		run();
	}
});
</script>
</head>
<body>
	<h1>Media plugin tests</h1>
	<h2 id="banner"></h2>
	<h2 id="userAgent"></h2>
	<ol id="tests"></ol>
	<div id="main"></div>
	<div id="content">
		<textarea id="elm1" name="elm1"></textarea>
		<div>
			<a href="javascript:alert(tinymce.EditorManager.get('elm1').getContent({format : 'raw'}));">[getRawContents]</a>
			<a href="javascript:alert(tinymce.EditorManager.get('elm1').getContent());">[getContents]</a>
		</div>
	</div>
</body>
</html>
